var COMMON = {

	initialize : function() {

		//hide notifications when modals are closed
		$('.nyroModalClose').click(function(){
			$('.box').hide();
		});

	},
	
	resize_modal : function(target,more_width,more_height) {
		initSettingSize = {
			width: $(target).width()+more_width,
			height: $(target).height()+more_height,
			windowResizing: true
		};
		$.nyroModalSettings(initSettingSize);
	},
	
	show_notification : function(target_box,box_type,message,modal_resize) {
		var callback = function() { COMMON.resize_modal(modal_resize.target,modal_resize.width,modal_resize.height); };
		if (!modal_resize) {
			callback = null;
		}
		$(target_box).removeClass().addClass('box').addClass(box_type).html(message).show('fast',callback);
	},
	
	hide_notification : function(target_box) {
		$(target_box).hide().removeClass().addClass('box').html('');
	}

}